<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../vue.js"></script>
</head>

<body>
  <div id="app">
    <form action="###">
      <!-- 下拉列表单选用字符串 -->
      <!-- 请选择你喜欢的城市：
      <select name="city" v-model = "city">
        <option value="大理">大理</option>
        <option value="拉萨">拉萨</option>
        <option value="丽江">丽江</option>
        <option value="西安">西安</option>
      </select> -->

      <!-- 下拉可以多选的时候用数组保存 -->
      请选择你喜欢的城市：
      <select name="city" multiple v-model = "citys">
        <option value="大理">大理</option>
        <option value="拉萨">拉萨</option>
        <option value="丽江">丽江</option>
        <option value="西安">西安</option>
      </select>
    
      
    </form>
  </div>
  <script>
    Vue.config.productionTip = false;

    const vm = new Vue({
      el: "#app",
      data() {
        return {
          //保存单选下拉框用字符串
        city: "大理",
        citys: []
        }
      }
    })
  </script>
</body>

</html>